package cn.kgc.fcm.dsbank.entity;

import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

@Data
public class Customer extends BaseEntity{

    public Long customerId;

    @NotNull(message = "姓名不能为空")
    @NotBlank(message = "没有看到姓名数据")
    private String customerName;

    @NotNull(message = "电话不能为空")
    @Pattern(regexp = "^1[35678]\\d{9}$", message = "手机号格式不正确")
    private String telNo;

    @NotNull(message = "证件类别不能为空")
    @NotBlank(message = "数据不明确")
    private String idTypeId;

    @NotNull(message = "身份证不能为空")
    @Pattern(regexp = "^(\\d{6})(\\d{4})(\\d{2})(\\d{2})(\\d{3})([0-9]|X)$",message = "身份证号不合法")
    private String idNo;

    @NotNull(message = "省份不能为空")
    private Integer pId;

    @NotNull(message = "城市不能为空")
    private Integer cId;

    @NotNull(message = "区市县信息不能为空")
    private Integer tId;

    private String prvinceName;
    private String cityName;
    private String districtName;

    @NotNull(message = "单位名称不能为空")
    @NotBlank(message = "单位信息不明确")
    private String coName;
    @NotNull(message = "单位地址不能为空")
    @NotBlank(message = "单位地址信息不明确")
    private String coAddress;
    @NotNull(message = "家庭住址不能为空")
    @NotBlank(message = "家庭住址信息不明确")
    private String homeAddress;

    private Certificate ct;

    private String idImgUrl;

}
